Optimal. Leaf size=406 \[ \frac {b n x \left (d^2-e^2 x^2\right )}{4 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )^2}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \log \left (1-e^{2 i \sin ^{-1}\left (\frac {e x}{d}\right )}\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \text {Li}_2\left (e^{2 i \sin ^{-1}\left (\frac {e x}{d}\right )}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 406, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 12, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {2387, 327,
222, 2392, 12, 14, 201, 4721, 3798, 2221, 2317, 2438} \begin {gather*} \frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \text {PolyLog}\left (2,e^{2 i \text {ArcSin}\left (\frac {e x}{d}\right )}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \text {ArcSin}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \text {ArcSin}\left (\frac {e x}{d}\right )^2}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \text {ArcSin}\left (\frac {e x}{d}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \text {ArcSin}\left (\frac {e x}{d}\right ) \log \left (1-e^{2 i \text {ArcSin}\left (\frac {e x}{d}\right )}\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {b n x \left (d^2-e^2 x^2\right )}{4 e^2 \sqrt {d-e x} \sqrt {d+e x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 201
Rule 222
Rule 327
Rule 2221
Rule 2317
Rule 2387
Rule 2392
Rule 2438
Rule 3798
Rule 4721
Rubi steps
\begin {align*} \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d-e x} \sqrt {d+e x}} \, dx &=\frac {\sqrt {1-\frac {e^2 x^2}{d^2}} \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\sqrt {1-\frac {e^2 x^2}{d^2}}} \, dx}{\sqrt {d-e x} \sqrt {d+e x}}\\ &=-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (b n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \int \frac {d^2 \left (-e x \sqrt {\frac {d^2-e^2 x^2}{d^2}}+d \sin ^{-1}\left (\frac {e x}{d}\right )\right )}{2 e^3 x} \, dx}{\sqrt {d-e x} \sqrt {d+e x}}\\ &=-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (b d^2 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \int \frac {-e x \sqrt {\frac {d^2-e^2 x^2}{d^2}}+d \sin ^{-1}\left (\frac {e x}{d}\right )}{x} \, dx}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}\\ &=-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (b d^2 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \int \left (-e \sqrt {1-\frac {e^2 x^2}{d^2}}+\frac {d \sin ^{-1}\left (\frac {e x}{d}\right )}{x}\right ) \, dx}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}\\ &=-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \int \frac {\sin ^{-1}\left (\frac {e x}{d}\right )}{x} \, dx}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {\left (b d^2 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \int \sqrt {1-\frac {e^2 x^2}{d^2}} \, dx}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}\\ &=\frac {b n x \left (d^2-e^2 x^2\right )}{4 e^2 \sqrt {d-e x} \sqrt {d+e x}}-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \text {Subst}\left (\int x \cot (x) \, dx,x,\sin ^{-1}\left (\frac {e x}{d}\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {\left (b d^2 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \int \frac {1}{\sqrt {1-\frac {e^2 x^2}{d^2}}} \, dx}{4 e^2 \sqrt {d-e x} \sqrt {d+e x}}\\ &=\frac {b n x \left (d^2-e^2 x^2\right )}{4 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )^2}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {\left (i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \text {Subst}\left (\int \frac {e^{2 i x} x}{1-e^{2 i x}} \, dx,x,\sin ^{-1}\left (\frac {e x}{d}\right )\right )}{e^3 \sqrt {d-e x} \sqrt {d+e x}}\\ &=\frac {b n x \left (d^2-e^2 x^2\right )}{4 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )^2}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \log \left (1-e^{2 i \sin ^{-1}\left (\frac {e x}{d}\right )}\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {\left (b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \text {Subst}\left (\int \log \left (1-e^{2 i x}\right ) \, dx,x,\sin ^{-1}\left (\frac {e x}{d}\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}\\ &=\frac {b n x \left (d^2-e^2 x^2\right )}{4 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )^2}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \log \left (1-e^{2 i \sin ^{-1}\left (\frac {e x}{d}\right )}\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}}\right ) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i \sin ^{-1}\left (\frac {e x}{d}\right )}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}\\ &=\frac {b n x \left (d^2-e^2 x^2\right )}{4 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )^2}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \log \left (1-e^{2 i \sin ^{-1}\left (\frac {e x}{d}\right )}\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {x \left (d^2-e^2 x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 \sqrt {d-e x} \sqrt {d+e x}}+\frac {d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {i b d^3 n \sqrt {1-\frac {e^2 x^2}{d^2}} \text {Li}_2\left (e^{2 i \sin ^{-1}\left (\frac {e x}{d}\right )}\right )}{4 e^3 \sqrt {d-e x} \sqrt {d+e x}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.89, size = 316, normalized size = 0.78 \begin {gather*} \frac {-2 e x \sqrt {d-e x} \sqrt {d+e x} \left (a-b n \log (x)+b \log \left (c x^n\right )\right )+2 d^2 \tan ^{-1}\left (\frac {e x}{\sqrt {d-e x} \sqrt {d+e x}}\right ) \left (a-b n \log (x)+b \log \left (c x^n\right )\right )+\frac {b n \left (d^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \sin ^{-1}\left (\frac {e x}{d}\right )+e x \left (-d^2+e^2 x^2\right ) (-1+2 \log (x))+\frac {e^3 \sqrt {1-\frac {e^2 x^2}{d^2}} \left (\sinh ^{-1}\left (\sqrt {-\frac {e^2}{d^2}} x\right )^2+2 \sinh ^{-1}\left (\sqrt {-\frac {e^2}{d^2}} x\right ) \log \left (1-e^{-2 \sinh ^{-1}\left (\sqrt {-\frac {e^2}{d^2}} x\right )}\right )-2 \log (x) \log \left (\sqrt {-\frac {e^2}{d^2}} x+\sqrt {1-\frac {e^2 x^2}{d^2}}\right )-\text {Li}_2\left (e^{-2 \sinh ^{-1}\left (\sqrt {-\frac {e^2}{d^2}} x\right )}\right )\right )}{\left (-\frac {e^2}{d^2}\right )^{3/2}}\right )}{\sqrt {d-e x} \sqrt {d+e x}}}{4 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int \frac {x^{2} \left (a +b \ln \left (c \,x^{n}\right )\right )}{\sqrt {-e x +d}\, \sqrt {e x +d}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^2\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{\sqrt {d+e\,x}\,\sqrt {d-e\,x}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________